import request from '@/utils/request'

interface fetchShopEditType {
  id:number,
  name: string,
  bulletin:string,
  avatar: string,
  pics: Array<string>,
  deliveryPrice: number,
  deliveryTime: number,
  description: string,
  score: number,
  sellCount: number,
  supports: Array<string>,
  date: Array<string>,
}
//二次封装，只需传入参数
export const fetchShopInfo = async()=>{
  const res = await request.getCategories('/shop/info')
  return res
}
export const fetchShopEdit = async(ShopData:fetchShopEditType)=>{
  const res = await request.post('/shop/edit',ShopData)
  return res.data
}
